<p><a href="<?php echo $this->url(array('controller'=>'admin','action'=>'add'));?>">Add new post</a></p>

<br />

<table border=1 width=50%>
<?php foreach($this->galleries as $gallery) : ?>

<tr>
    <td><?php echo $this->escape($gallery->datet);?></td>
    <td><?php echo $this->escape($gallery->title);?></td>
    <td>
   		<a href="<?php echo $this->url(array('controller'=>'admin','action'=>'edit', 'id'=>$gallery->id));?>">Edit</a>
   		<a href="<?php echo $this->url(array('controller'=>'admin','action'=>'delete', 'id'=>$gallery->id));?>">Delete</a>
	</td>
</tr>
<?php endforeach; ?>
</table>
